/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PaymentFrame.java
 *
 * Created on 16-06-2011, 12:40:38
 */
package ui.gui;

import controller.SaleController;
import java.text.NumberFormat;
import java.text.ParseException;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import model.Customer;
import model.Delivery;
import model.Sale;
import ui.gui.table.model.SaleTableModel;
import ui.gui.table.renderer.DecimalCellRenderer;

/**
 *
 * @author Martin Mohr Pedersen
 */
public class PaymentFrame extends javax.swing.JFrame {

    private JFrame parent;
    private SaleController controller;
    private SaleTableModel tableModel;

    /** Creates new form PaymentFrame */
    public PaymentFrame(JFrame parent, SaleController controller) {
        initComponents();

        this.controller = controller;
        this.parent = parent;
        initTable();

        updateTotal();
        updateCustomerInfo();
        updateDeliveryInfo();

    }

    private void initTable() {
        tableModel = new SaleTableModel(controller.getSale());
        tblSale.setModel(tableModel);
        tblSale.setDefaultRenderer(java.lang.Double.class, new DecimalCellRenderer(2));
    }

    private void updateTotal() {

        Sale sale = controller.getSale();

        String format = "%.2f";

        lblSubTotalValue.setText(String.format(format, sale.getSubTotal()));
        lblDiscountValue.setText(String.format(format, sale.getSavings()));

        Delivery delivery = sale.getDelivery();

        double deliveryPrice = 0;

        if (delivery != null) {
            deliveryPrice = delivery.getPrice();
        }

        lblDeliveryValue.setText(String.format(format, deliveryPrice));

        lblTotalValue.setText(String.format(format, sale.getTotal()));

    }

    private void updateCustomerInfo() {
        Customer customer = controller.getSale().getCustomer();

        if (customer == null) {
            customer = new Customer();
        }

        lblCustomerNameValue.setText(customer.getName());
        lblCustomerAddressValue.setText(customer.getAddress());
        lblCustomerZipCodeValue.setText(Integer.toString(customer.getZipCode()));
        lblCustomerCityValue.setText(customer.getCity());

    }

    private void updateDeliveryInfo() {
        Delivery delivery = controller.getSale().getDelivery();

        if (delivery == null) {
            delivery = new Delivery(null);
        }

        lblDeliveryInfoName.setText(delivery.getName());
        lblDeliveryInfoAddress.setText(delivery.getAddress());
        lblDeliveryInfoZipCode.setText(Integer.toString(delivery.getZipCode()));
        lblDeliveryInfoCity.setText(delivery.getCity());

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlTable = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblSale = new javax.swing.JTable();
        pnlTotals = new javax.swing.JPanel();
        lblTotal = new javax.swing.JLabel();
        lblTotalValue = new javax.swing.JLabel();
        lblDiscountValue = new javax.swing.JLabel();
        lblDiscount = new javax.swing.JLabel();
        lblDeliveryValue = new javax.swing.JLabel();
        lblDelivery = new javax.swing.JLabel();
        lblSubTotal = new javax.swing.JLabel();
        lblSubTotalValue = new javax.swing.JLabel();
        pnlButtons = new javax.swing.JPanel();
        btnCashPayment = new javax.swing.JButton();
        btnInvoce = new javax.swing.JButton();
        pnlCustomer = new javax.swing.JPanel();
        lblCustomerName = new javax.swing.JLabel();
        lblCustomerAddress = new javax.swing.JLabel();
        lblCustomerZipCode = new javax.swing.JLabel();
        lblCustomerCity = new javax.swing.JLabel();
        lblCustomerNameValue = new javax.swing.JLabel();
        lblCustomerAddressValue = new javax.swing.JLabel();
        lblCustomerZipCodeValue = new javax.swing.JLabel();
        lblCustomerCityValue = new javax.swing.JLabel();
        pnlDelivery = new javax.swing.JPanel();
        lblDeliveryInfoNameTxt = new javax.swing.JLabel();
        lblDeliveryInfoAddressTxt = new javax.swing.JLabel();
        lblDeliveryInfoZipCodeTxt = new javax.swing.JLabel();
        lblDeliveryInfoCityTxt = new javax.swing.JLabel();
        lblDeliveryInfoName = new javax.swing.JLabel();
        lblDeliveryInfoAddress = new javax.swing.JLabel();
        lblDeliveryInfoZipCode = new javax.swing.JLabel();
        lblDeliveryInfoCity = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        tblSale.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Vare", "Antal", "Stk. pris", "Pris"
            }
        ));
        jScrollPane1.setViewportView(tblSale);

        lblTotal.setFont(new java.awt.Font("Ubuntu", 1, 15));
        lblTotal.setText("Total:");

        lblTotalValue.setFont(new java.awt.Font("Ubuntu", 1, 15));
        lblTotalValue.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblTotalValue.setText("total");

        lblDiscountValue.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblDiscountValue.setText("discount");

        lblDiscount.setText("Rabat:");

        lblDeliveryValue.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblDeliveryValue.setText("delivery");

        lblDelivery.setText("Levering:");

        lblSubTotal.setText("Subtotal:");

        lblSubTotalValue.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblSubTotalValue.setText("subTotal");

        javax.swing.GroupLayout pnlTotalsLayout = new javax.swing.GroupLayout(pnlTotals);
        pnlTotals.setLayout(pnlTotalsLayout);
        pnlTotalsLayout.setHorizontalGroup(
            pnlTotalsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTotalsLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlTotalsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblTotal)
                    .addComponent(lblDelivery)
                    .addComponent(lblDiscount)
                    .addComponent(lblSubTotal))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 83, Short.MAX_VALUE)
                .addGroup(pnlTotalsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblSubTotalValue, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblDiscountValue, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblDeliveryValue, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblTotalValue, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        pnlTotalsLayout.setVerticalGroup(
            pnlTotalsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTotalsLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlTotalsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTotalsLayout.createSequentialGroup()
                        .addComponent(lblSubTotalValue)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblDiscountValue)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblDeliveryValue)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblTotalValue))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTotalsLayout.createSequentialGroup()
                        .addComponent(lblSubTotal)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblDiscount)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblDelivery)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblTotal)))
                .addContainerGap())
        );

        javax.swing.GroupLayout pnlTableLayout = new javax.swing.GroupLayout(pnlTable);
        pnlTable.setLayout(pnlTableLayout);
        pnlTableLayout.setHorizontalGroup(
            pnlTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 525, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTableLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlTotals, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        pnlTableLayout.setVerticalGroup(
            pnlTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTableLayout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(pnlTotals, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        btnCashPayment.setText("Kontant betaling");
        btnCashPayment.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCashPaymentActionPerformed(evt);
            }
        });

        btnInvoce.setText("Faktura betaling");
        btnInvoce.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnInvoceActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlButtonsLayout = new javax.swing.GroupLayout(pnlButtons);
        pnlButtons.setLayout(pnlButtonsLayout);
        pnlButtonsLayout.setHorizontalGroup(
            pnlButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlButtonsLayout.createSequentialGroup()
                .addContainerGap(251, Short.MAX_VALUE)
                .addComponent(btnInvoce)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnCashPayment)
                .addContainerGap())
        );
        pnlButtonsLayout.setVerticalGroup(
            pnlButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlButtonsLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnCashPayment)
                    .addComponent(btnInvoce))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlCustomer.setBorder(javax.swing.BorderFactory.createTitledBorder("Kundeinformationer"));

        lblCustomerName.setText("Navn:");

        lblCustomerAddress.setText("Adresse:");

        lblCustomerZipCode.setText("Postnr:");

        lblCustomerCity.setText("By:");

        lblCustomerNameValue.setText("jLabel5");

        lblCustomerAddressValue.setText("jLabel6");

        lblCustomerZipCodeValue.setText("jLabel7");

        lblCustomerCityValue.setText("jLabel8");

        javax.swing.GroupLayout pnlCustomerLayout = new javax.swing.GroupLayout(pnlCustomer);
        pnlCustomer.setLayout(pnlCustomerLayout);
        pnlCustomerLayout.setHorizontalGroup(
            pnlCustomerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCustomerLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlCustomerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblCustomerName, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblCustomerAddress, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblCustomerZipCode, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlCustomerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblCustomerNameValue)
                    .addComponent(lblCustomerAddressValue)
                    .addGroup(pnlCustomerLayout.createSequentialGroup()
                        .addComponent(lblCustomerZipCodeValue)
                        .addGap(14, 14, 14)
                        .addComponent(lblCustomerCity)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblCustomerCityValue)))
                .addContainerGap(16, Short.MAX_VALUE))
        );
        pnlCustomerLayout.setVerticalGroup(
            pnlCustomerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCustomerLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlCustomerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblCustomerName)
                    .addComponent(lblCustomerNameValue))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlCustomerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblCustomerAddress)
                    .addComponent(lblCustomerAddressValue))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlCustomerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblCustomerZipCode)
                    .addComponent(lblCustomerCity)
                    .addComponent(lblCustomerZipCodeValue)
                    .addComponent(lblCustomerCityValue))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlDelivery.setBorder(javax.swing.BorderFactory.createTitledBorder("Leveringsinformationer"));

        lblDeliveryInfoNameTxt.setText("Navn:");

        lblDeliveryInfoAddressTxt.setText("Adresse:");

        lblDeliveryInfoZipCodeTxt.setText("Postnr:");

        lblDeliveryInfoCityTxt.setText("By:");

        lblDeliveryInfoName.setText("jLabel5");

        lblDeliveryInfoAddress.setText("jLabel6");

        lblDeliveryInfoZipCode.setText("jLabel7");

        lblDeliveryInfoCity.setText("jLabel8");

        javax.swing.GroupLayout pnlDeliveryLayout = new javax.swing.GroupLayout(pnlDelivery);
        pnlDelivery.setLayout(pnlDeliveryLayout);
        pnlDeliveryLayout.setHorizontalGroup(
            pnlDeliveryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDeliveryLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDeliveryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblDeliveryInfoNameTxt, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblDeliveryInfoAddressTxt, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblDeliveryInfoZipCodeTxt, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDeliveryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblDeliveryInfoName)
                    .addComponent(lblDeliveryInfoAddress)
                    .addGroup(pnlDeliveryLayout.createSequentialGroup()
                        .addComponent(lblDeliveryInfoZipCode)
                        .addGap(18, 18, 18)
                        .addComponent(lblDeliveryInfoCityTxt)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblDeliveryInfoCity)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlDeliveryLayout.setVerticalGroup(
            pnlDeliveryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDeliveryLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDeliveryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDeliveryInfoNameTxt)
                    .addComponent(lblDeliveryInfoName))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDeliveryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDeliveryInfoAddressTxt)
                    .addComponent(lblDeliveryInfoAddress))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDeliveryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDeliveryInfoZipCodeTxt)
                    .addComponent(lblDeliveryInfoCityTxt)
                    .addComponent(lblDeliveryInfoZipCode)
                    .addComponent(lblDeliveryInfoCity))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(pnlButtons, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlTable, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnlCustomer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlDelivery, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(pnlCustomer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(pnlDelivery, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(pnlTable, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(pnlButtons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnInvoceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnInvoceActionPerformed
        controller.closeSale();

        JOptionPane.showMessageDialog(this, "Salget er lukket og noteret til senere betaling", null, JOptionPane.INFORMATION_MESSAGE);

        if (parent != null) {
            parent.dispose();
        }

        JFrame frame = new NewSaleFrame();
        frame.setLocationRelativeTo(this);
        frame.setVisible(true);

        this.dispose();
    }//GEN-LAST:event_btnInvoceActionPerformed

    private void btnCashPaymentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCashPaymentActionPerformed
        String amount = JOptionPane.showInputDialog(this, "Indtast betalte beløb", null, JOptionPane.QUESTION_MESSAGE);

        Double amountDouble = 0.0;

        try {
            amountDouble = NumberFormat.getInstance().parse(amount).doubleValue();
        } catch (ParseException pe) {
            JOptionPane.showMessageDialog(this, "Det indtastede beløb kunne ikke tolkes.", null, JOptionPane.WARNING_MESSAGE);
            return;
        }

        controller.registerCashPayment(amountDouble);
        controller.closeSale();

        JOptionPane.showMessageDialog(this, "Salget er lukket og noteret som betalt", null, JOptionPane.INFORMATION_MESSAGE);

        this.dispose();

        if (parent != null) {
            parent.dispose();
        }

        JFrame frame = new NewSaleFrame();
        frame.setLocationRelativeTo(this);
        frame.setVisible(true);

    }//GEN-LAST:event_btnCashPaymentActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnCashPayment;
    private javax.swing.JButton btnInvoce;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblCustomerAddress;
    private javax.swing.JLabel lblCustomerAddressValue;
    private javax.swing.JLabel lblCustomerCity;
    private javax.swing.JLabel lblCustomerCityValue;
    private javax.swing.JLabel lblCustomerName;
    private javax.swing.JLabel lblCustomerNameValue;
    private javax.swing.JLabel lblCustomerZipCode;
    private javax.swing.JLabel lblCustomerZipCodeValue;
    private javax.swing.JLabel lblDelivery;
    private javax.swing.JLabel lblDeliveryInfoAddress;
    private javax.swing.JLabel lblDeliveryInfoAddressTxt;
    private javax.swing.JLabel lblDeliveryInfoCity;
    private javax.swing.JLabel lblDeliveryInfoCityTxt;
    private javax.swing.JLabel lblDeliveryInfoName;
    private javax.swing.JLabel lblDeliveryInfoNameTxt;
    private javax.swing.JLabel lblDeliveryInfoZipCode;
    private javax.swing.JLabel lblDeliveryInfoZipCodeTxt;
    private javax.swing.JLabel lblDeliveryValue;
    private javax.swing.JLabel lblDiscount;
    private javax.swing.JLabel lblDiscountValue;
    private javax.swing.JLabel lblSubTotal;
    private javax.swing.JLabel lblSubTotalValue;
    private javax.swing.JLabel lblTotal;
    private javax.swing.JLabel lblTotalValue;
    private javax.swing.JPanel pnlButtons;
    private javax.swing.JPanel pnlCustomer;
    private javax.swing.JPanel pnlDelivery;
    private javax.swing.JPanel pnlTable;
    private javax.swing.JPanel pnlTotals;
    private javax.swing.JTable tblSale;
    // End of variables declaration//GEN-END:variables
}
